﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class Employee
    {
        /// <summary>
        /// 数据唯一标识符
        /// </summary>
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }

        /// <summary>
        /// enum:
        ///0：领导
        ///1：党务人员
        ///2：雇员
        /// </summary>
        [Required]
        public int Postion { get; set; }

        /// <summary>
        /// 薪资
        /// </summary>
        [Required]
        public float Salary { get; set; }

        /// <summary>
        /// 学历
        /// </summary>
        [Required]
        public string educational_background { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [StringLength(30)]
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 家庭住址
        /// </summary>
        [Required]
        public string address { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [Required]
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        public bool Gender { get; set; }

        /// <summary>
        /// 参加工作日期
        /// </summary>
        [Required]
        public DateTime WorkingDate { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        [Required]
        public DateTime AddTime { get; set; }
    }
}
